In this section we are going to create a "Reaction Timer Game". I have covered the "formal" software engineering approach and we will return to this at the end. However, sometimes you just want to have a little fun, and find out what a system can do for you. This is a kind of "bottom up" development where we create low level components, fit them together and create a working system.

There is not a particularly formal design process, but we don't really have time for that in some situations anyway. If you want to play with the PICmicro in this way (and some of the greatest inventions have come from engineers "playing" with systems like this) I hope that this exercise will give you some ideas. If you are more interested in formal design methods we will return to them in future exercises. Note that I am not going to give up on sensible design or program construction however, I will be testing at each phase of the development and the system will be properly commented and broken into appropriate functions. If this means I have to move code around, that is fair enough.

You may find it fun to take the specification of each stage and try to implement it yourself before moving on to the next part. You can then compare your solution with mine and use the better one each time!

The aim of the game is to produce a "Reaction Timer". The game will light an LED and then time how long it takes the user to notice this. In the interests of science I will test myself, drink half a bottle of wine, and then test myself again.

A mouse in danger
Will the mouse react in time?